<?php
namespace app\shop\service;

use app\common\model\admin\service_config\ServiceConfigTabAccount;
use think\exception\HttpResponseException;

class BaseService
{




    /**
     * 错误回执
     *
     * @param string $msg
     * @return mixed
     */
    public function error (string $msg)
    {

        $result = ['code' => 0, 'info' => lang($msg)];

        throw new HttpResponseException(json($result));
    }


    /**
     * 成功回执
     *
     * @param string $msg
     * @param array  $data
     * @return mixed
     */
    public function success (string $msg, array $data)
    {

        $result = ['code' => 0, 'info' => lang($msg)];

        throw new HttpResponseException(json($result));
    }


}

?>